package com.zyf.school.manager.controller;

import com.zyf.school.manager.domain.Holiday;
import com.zyf.school.manager.service.HolidayService;
import com.zyf.school.manager.util.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
@RequestMapping("/holiday/")
public class HolidayController {

    @Autowired
    HolidayService holidayService;;
    List<Holiday> holidayList;

    int count;
    public void count(PageBean page){
        page.setTotalCount(holidayService.count());
    }

    //节假日设置
    @RequestMapping("festival")
    public String festival(HttpServletRequest request, PageBean page){
        System.out.println("节假日设置...................");
        return "holiday/festival";
    }
}
